﻿@model noteVt.Models.DataModels.Article
@{
    ViewBag.Title = "Index";
}
@section clientScripts
{
    <script type="text/javascript" src="~/static/js/nicEdit.js"></script>
}

<script type="text/javascript">
    bkLib.onDomLoaded(function () {
        new nicEditor({
            fullPanel: true,
            iconsPath: "/static/img/nicEditorIcons.gif"
        }).panelInstance('editArea');
    });
</script>

<h1>Редактировать запись</h1>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.HiddenFor(a => Model.Id)
    <h4>
        @Html.DisplayNameFor(a => a.Alias)
        @Html.ValidationMessageFor(a => a.Alias)
    </h4>
    @Html.TextBoxFor(a => a.Alias)
    <h4>
        @Html.DisplayNameFor(a => a.ArticleContent)
    </h4>
    @Html.TextAreaFor(a => a.ArticleContent, new
        {
            style = "width: 100%; height: 500px;",
            id = "editArea"
        })
    <h4>
    <input type="submit" value="Редактировать" class="btn btn-primary">
    </h4>
}